<?php
//use Illuminate\Support\Facades\Schema;
use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopProductCommentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_product_comments', function (Blueprint $table) {
            $table->comment = '商品评论表';
            $table->increments('id')->comment('商品评论表ID');
			$table->string('content')->default('')->comment('评论内容');
			$table->string('images')->default('')->comment('评论图：多个用|隔开');
			$table->integer('user_id')->nullable()->comment('用户id');
			$table->integer('product_id')->nullable()->comment('商品id');
			$table->tinyInteger('level')->default(1)->comment('星级：1到5');
            $table->timestamps(); 
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_product_comments');
    }
}
